package com.lz.demo.log.log4j2;

import com.lz.demo.log.log4j2.subpackage.SubPackageTest;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * 日志级别从高到低：fatal、error、warn、info、debug、trace
 * 另外，还有 off 和 all 表示关闭和记录所有日志
 */
public class Log4j2Test {

    static final Logger LOGGER = LogManager.getLogger(Log4j2Test.class);

    public static void main( String[] args ) {
        LOGGER.debug("log4j2 debug print");
        LOGGER.info("log4j2 info print");
        LOGGER.warn("log4j2 warn print");
        LOGGER.error("log4j2 error print");
        LOGGER.fatal("log4j2 fatal print");

        SubPackageTest.testPackageFilter();
    }
}
